package com.xxx.services;

import com.xxx.mapper.ClassInfoMapper;
import com.xxx.mapper.DishMapper;
import com.xxx.mapper.EmployeeMapper;
import com.xxx.mapper.PackageMapper;
import com.xxx.pojo.ClassInfo;
import com.xxx.pojo.Dish;
import com.xxx.pojo.Employee;
import com.xxx.pojo.Package;
import com.xxx.util.GetIdTime;
import com.xxx.util.SqlSessionFactoryUtil;
import org.apache.ibatis.session.SqlSession;
import org.apache.ibatis.session.SqlSessionFactory;

import java.math.BigDecimal;
import java.sql.SQLException;
import java.util.List;
import java.util.Scanner;

public class Login {
    private Long id = null;//当前登入的账号id
    private Employee e;//当前登入用户信息
    Scanner sc = new Scanner(System.in);

    private static SqlSessionFactory factory = SqlSessionFactoryUtil.getSqlSessionFactory();

    /**
     * 用户名，密码赋值
     */
    public void loginMenu() {
        System.out.println("======登入菜单======");
        while (true) {
            System.out.println("请输入用户名：");
            String username = sc.next();
            System.out.println("请输入密码：");
            String password = sc.next();
            if (username == null || password == null) {
                System.out.println("账号或者密码不能为空");
                continue;
            }

            if (okLogin(username, password)) {
                mainMenu();
                break;
            }
        }
    }

    /**
     * 链接数据库，判断账号密码
     *
     * @param username 用户名
     * @param password 密码
     * @return 返回判断
     */
    public boolean okLogin(String username, String password) {
        try {

            e = new Employee();
            e.setUsername(username);
            e.setPassword(password);
            SqlSession sqlSession = factory.openSession();
            EmployeeMapper mapper = sqlSession.getMapper(EmployeeMapper.class);
            Employee employee = mapper.selectEmployee(e);
            sqlSession.close();
            e = employee;

            if (e != null) {
                if (e.getStatus() != 1) {
                    System.out.println("您的账号已被禁用");
                    return false;
                }
                id = e.getId();
                System.out.println("欢迎" + e.getName() + "回来~~");
                return true;

            } else {
                System.out.println("账号或者密码错误~~~");
                return false;
            }

        } catch (Exception e) {
            throw new RuntimeException(e);
        }
    }


    //员工管理,分类管理,菜品管理,套餐管理,订单管理,订单明细管理
    public void mainMenu() {
        while (true) {
            System.out.println("======管理菜单======");
            System.out.println("1.员工管理");
            System.out.println("2.分类管理");
            System.out.println("3.菜品管理");
            System.out.println("4.套餐管理");
            System.out.println("5.订单管理");
            System.out.println("6.订单明细管理");
            System.out.println("7.退出登入");
            System.out.println("请输入对应操作");
            switch (sc.next()) {
                case "1":
                    employeeManagement();
                    break;
                case "2":
                    classManagement();
                    break;
                case "3":
                    dishManagement();
                    break;
                case "4":
                    packageManagement();
                    break;
                case "5":
                    orderManagement();
                    break;
                case "6":
                    orderDetailsManagement();
                    break;
                case "7":

                    return;
                default:
                    System.out.println("输入错误，请重新输入~~");

            }
        }


    }

    ////员工管理,分类管理,菜品管理,套餐管理,订单管理,订单明细管理

    /**
     * 菜单页面
     */
    public void employeeManagement() {
        while (true) {
            System.out.println("======员工管理菜单======");
            System.out.println("1.添加员工");
            System.out.println("2.修改员工");
            System.out.println("3.删除员工");
            System.out.println("4.查询员工");
            System.out.println("5.退出");
            switch (sc.next()) {
                case "1":
                    Employee employee = new Employee();
                    employee = employeeInformationAdd();
                    add(employee);
                    break;
                case "2":
                    employeeInformationModify();
                    break;
                case "3":
                    employeeDeleteById();
                    break;
                case "4":
                    employeeQueryById();
                    break;
                case "5":
                    return;
                default:
                    System.out.println("输入错误，重新输入~~");

            }
        }
    }

    /**
     * 分类管理菜单
     */
    public void classManagement() {
        while (true) {
            System.out.println("======分类管理菜单======");
            System.out.println("1.添加分类");
            System.out.println("2.修改分类");
            System.out.println("3.删除分类");
            System.out.println("4.查询分类");
            System.out.println("5.退出");
            switch (sc.next()) {
                case "1":
                    classAdd();
                    break;
                case "2":
                    classModifyById();
                    break;
                case "3":
                    classDeleteById();
                    break;
                case "4":
                    classQueryById();
                    break;
                case "5":
                    return;
                default:
                    System.out.println("输入错误，重新输入~~");

            }
        }
    }


    /**
     * 查询分类
     */
    private void classQueryById() {

        SqlSession sqlSession = factory.openSession();
        ClassInfoMapper mapper = sqlSession.getMapper(ClassInfoMapper.class);
        List<ClassInfo> classInfos = mapper.selectAll();
        if (classInfos == null)
            System.out.println("没有数据~~~");
        else
            System.out.println(classInfos);

    }


    /**
     * 删除分类信息
     */
    private void classDeleteById() {

        SqlSession sqlSession = factory.openSession();
        ClassInfoMapper mapper = sqlSession.getMapper(ClassInfoMapper.class);

        String typesName;
        System.out.println("=======删除分类信息======");
        while (true) {
            System.out.println("请输入要删除的分类名称~~~");
            typesName = sc.next();
            ClassInfo classInfo = mapper.selectAllByTypesName(typesName);
            if (classInfo != null)
                break;
            else {
                System.out.println("不存在该类型~~,请重新输入~~~");
            }
            int i = mapper.delByTypesName(typesName);
            if (i < 1) {
                System.out.println("删除失败,");
            } else {
                System.out.println("删除成功");
                sqlSession.commit();
                sqlSession.close();
                break;

            }
        }

    }


    /**
     * 修改分类
     */
    private void classModifyById() {

        SqlSession sqlSession = factory.openSession();
        ClassInfoMapper mapper = sqlSession.getMapper(ClassInfoMapper.class);
        String typesName;
        String column;
        String data;
        System.out.println("=======修改分类信息======");
        while (true) {
            System.out.println("请输入要修改的分类名称~~~");
            typesName = sc.next();
            ClassInfo classInfo = mapper.selectAllByTypesName(typesName);
            if (classInfo != null) {
                break;
            } else
                System.out.println("不存在该分类~~,请重新输入~~~");
        }
        while (true) {
            String upDateTime = GetIdTime.getDataTime();
            System.out.println("请输入修改的列名~~");
            column = sc.next();
            System.out.println("请输入修改的值~~");
            data = sc.next();
            int i = mapper.updateClassInfo(column, upDateTime, this.id, data, typesName);
            if (i < 1) {
                System.out.println("修改失败");
                sqlSession.commit();
                sqlSession.close();
            } else {
                System.out.println("修改成功");
                break;
            }
        }

    }


    /**
     * 添加分类
     */
    public void classAdd() {

        SqlSession sqlSession = factory.openSession();
        ClassInfoMapper mapper = sqlSession.getMapper(ClassInfoMapper.class);

        String types;
        String typesName;
        Long order = null;
        String createTime;
        String updateTime;
        Long createUser;
        Long updateUser;
        System.out.println("=======添加分类信息======");

        while (true) {
            System.out.println("请输入分类的类型：");
            try {
                types = sc.next();

                if (types.length() < 32) {
                    break;
                } else
                    System.out.println("类型过长，请重新输入");
            } catch (Exception e) {
                System.out.println("输入类型错误，必须为数字");
            }
        }

        while (true) {
            System.out.println("请输入分类的名称：");
            typesName = sc.next();

            if (typesName.length() > 32) {
                System.out.println("名称过长，请重新输入");
                continue;
            }
            ClassInfo classInfo = mapper.selectAllByTypesName(typesName);
            if (classInfo != null) {
                System.out.println("分类名称重复，请重新输入~~~");
                break;
            }
        }
        createTime = GetIdTime.getDataTime();
        updateTime = GetIdTime.getDataTime();
        createUser = this.id;
        updateUser = this.id;
        ClassInfo classInfo = new ClassInfo(types, typesName, order, createTime, updateTime, createUser, updateUser);
        int i = mapper.addClassInfo(classInfo);
        if (i > 0) {
            System.out.println("添加成功~~");
            sqlSession.commit();
            sqlSession.close();

        } else
            System.out.println("添加失败~~");
    }


    /**
     * 分割线
     * --------------------------------------------------------------------------------------------------------------------------
     */
    public void dishManagement() {
        while (true) {
            System.out.println("======菜品管理菜单======");
            System.out.println("1.添加菜品");
            System.out.println("2.修改菜品");
            System.out.println("3.删除菜品");
            System.out.println("4.查询菜品");
            System.out.println("5.退出");
            switch (sc.next()) {
                case "1":
                    dishAdd();
                    break;
                case "2":
                    dishModifyById();
                    break;
                case "3":
                    dishDeleteById();
                    break;
                case "4":
                    dishQuery();
                    break;
                case "5":
                    return;
                default:
                    System.out.println("输入错误，重新输入~~");

            }
        }
    }

    public void dishModifyById() {
        Long dishId;
        String data;
        String column;
        SqlSession sqlSession = factory.openSession();
        DishMapper mapper = sqlSession.getMapper(DishMapper.class);
        System.out.println("=======修改菜品信息======");
        while (true) {
            System.out.println("请输入要修改的菜品的商品码~~~");
            dishId = new Long(sc.next());

            Dish dish = mapper.selectById(dishId);
            if (dish != null) {
                break;
            } else
                System.out.println("不存在该菜品~~,请重新输入~~~");
        }
        while (true) {
            String upDateTime = GetIdTime.getDataTime();
            System.out.println("请输入修改的列名~~");
            column = sc.next();
            System.out.println("请输入修改的值~~");
            data = sc.next();
            int i = mapper.updateDish(column, data, upDateTime, this.id, dishId);
            if (i < 1) {
                System.out.println("修改失败");
            } else {
                System.out.println("修改成功");
                sqlSession.commit();
                sqlSession.close();
                break;
            }

        }


    }


    /**
     * 删除菜品
     */
    public void dishDeleteById() {
        SqlSession sqlSession = factory.openSession();
        DishMapper mapper = sqlSession.getMapper(DishMapper.class);
        Long id;
        System.out.println("=======删除菜品信息======");
        while (true) {
            System.out.println("请输入要删除的菜品商品码~~~");
            id = new Long(sc.next());
            Dish dish = mapper.selectById(id);
            if (dish != null) {
                break;
            } else
                System.out.println("不存在该id~~,请重新输入~~~");

            int i = mapper.deleteById(id);
            if (i < 1) {
                System.out.println("删除失败");
            } else {
                System.out.println("删除成功");
                sqlSession.commit();
                sqlSession.close();
                break;
            }
        }

    }


    /**
     * 查询所有
     */
    public void dishQuery() {
        SqlSession sqlSession = factory.openSession();
        DishMapper mapper = sqlSession.getMapper(DishMapper.class);
        List<Dish> dishes = mapper.selectAll();
        if (dishes != null) {
            System.out.println(dishes);
        } else {
            System.out.println("没有数据~~~");
        }
        try {
            Thread.sleep(1000);
        } catch (InterruptedException ex) {
            throw new RuntimeException(ex);
        }


    }


    /**
     * 菜品添加
     */
    public void dishAdd() {

        SqlSession sqlSession = factory.openSession();
        String name;

        String typesName;
        BigDecimal price;
        Long id;//商品码
        String img = null;//暂时没有
        String describe = null; //描述信息
        int state = 1; //默认为1
        Long order = null;
        String createTime;
        String updateTime;
        Long createUser;
        Long updateUser;
        String sql;
        System.out.println("=======添加菜品信息======");
        while (true) {
            System.out.println("请输入菜品的名称：");

            name = sc.next();

            if (name.length() < 32) {
                break;
            } else
                System.out.println("名称过长，请重新输入");
        }
        while (true) {
            System.out.println("请输入菜品的分类名称：");

            ClassInfoMapper mapper = sqlSession.getMapper(ClassInfoMapper.class);
            List<ClassInfo> classInfos = mapper.selectAll();
            if (classInfos == null) {
                System.out.println("没有分类数据，请进行添加~~");
                return;
            }
            for (ClassInfo classInfo : classInfos) {
                System.out.println(classInfo.getOrder() + " " + classInfo.getTypesName());
            }
            typesName = sc.next();
            ClassInfo classInfo = mapper.selectAllByTypesName(typesName);
            sqlSession.close();
            if (classInfo == null)
                System.out.println("输入类型不存在，请重新输入~~~");
            else
                break;

        }


        System.out.println("请输入菜品的价格：");

        price = new BigDecimal(String.valueOf(sc.nextBigDecimal()));
        price = price.setScale(2);


        id = new Long("9" + GetIdTime.getId());

        while (true) {
            System.out.println("请输入菜品的描述信息：");

            describe = sc.next();

            if (describe.length() < 32) {
                break;
            } else
                System.out.println("名称过长，请重新输入");
        }

        while (true) {
            System.out.println("请输入菜品的状态：0.禁售     1.开售  ");
            try {
                state = sc.nextInt();
                if (state == 1 || state == 0)
                    break;
                else
                    System.out.println("输入错误");
            } catch (Exception e) {
                System.out.println("输入错误");
                throw new RuntimeException(e);
            }
        }

        createTime = GetIdTime.getDataTime();
        updateTime = GetIdTime.getDataTime();
        createUser = this.id;
        updateUser = this.id;
        Dish dish = new Dish(name, typesName, price, id, img, describe, state, order, createTime, updateTime, createUser, updateUser, 0);
        sqlSession = factory.openSession();
        DishMapper mapper = sqlSession.getMapper(DishMapper.class);
        int i = mapper.addDish(dish);
        if (i > 0) {
            System.out.println("创建成功");
            sqlSession.commit();
            sqlSession.close();
        } else
            System.out.println("创建失败");
    }


    /**
     * 套餐菜单
     * * -----------------------------------------------------------------------------------------------------------------------/
     */
    public void packageManagement() {

        while (true) {
            System.out.println("======套餐管理菜单======");
            System.out.println("1.添加套餐");
            System.out.println("2.修改套餐");
            System.out.println("3.删除套餐");
            System.out.println("4.查询套餐");
            System.out.println("5.退出");
            switch (sc.next()) {
                case "1":
                    packageAdd();
                    break;
                case "2":
                    packageModifyById();
                    break;
                case "3":
                    packageDeleteById();
                    break;
                case "4":
                    packageQuery();
                    break;
                case "5":
                    return;
                default:
                    System.out.println("输入错误，重新输入~~");

            }
        }

    }

    private void packageQuery() {

        SqlSession sqlSession = factory.openSession();
        PackageMapper mapper = sqlSession.getMapper(PackageMapper.class);
        List<Package> packages = mapper.selectAll();
        if (packages == null)
            System.out.println("没有数据~~~");
        else {
            sqlSession.close();
            System.out.println(packages);
        }
    }

    private void packageDeleteById() {
        SqlSession sqlSession = factory.openSession();
        PackageMapper mapper = sqlSession.getMapper(PackageMapper.class);
        Long code;
        System.out.println("=======删除套餐信息======");
        while (true) {
            System.out.println("请输入要删除的菜品商品码~~~");
            code = new Long( sc.next());
            Package aPackage = mapper.selectByCode(code);
            if (aPackage != null) {
                break;
            } else
                System.out.println("不存在该商品码~~,请重新输入~~~");

        }
        int i = mapper.delByCode(code);
        if (i < 1) {
            System.out.println("删除失败");
        } else {
            sqlSession.commit();
            sqlSession.close();
            System.out.println("删除成功");

        }
    }

    private void packageModifyById() {
        SqlSession sqlSession = factory.openSession();
        Long code;
        String data;
        String column;
        System.out.println("=======修改套餐信息======");
        while (true) {
            System.out.println("请输入要修改的套餐的编码~~~");
            code =Long.valueOf(sc.next());
            PackageMapper mapper = sqlSession.getMapper(PackageMapper.class);
            Package aPackage = mapper.selectByCode(code);
            if (aPackage != null) {
                break;
            } else
                System.out.println("不存在该菜品~~,请重新输入~~~");

        }
        while (true) {
            String updateTime = GetIdTime.getDataTime();
            System.out.println("请输入修改的列名~~");
            column = sc.next();
            System.out.println("请输入修改的值~~");
            data = sc.next();
            PackageMapper mapper = sqlSession.getMapper(PackageMapper.class);
            int i = mapper.updatePackage(column, data, updateTime, this.id, code);
            if (i < 1) {
                System.out.println("修改失败");
            } else {
                sqlSession.commit();
                sqlSession.close();
                System.out.println("修改成功");
                break;
            }
        }


    }

    private void packageAdd() {

        SqlSession sqlSession = factory.openSession();
        String typesName; //分类名称
        String name;
        BigDecimal price;
        int state;
        Long code;//编码
        String describe = null; //描述信息
        String img = null;//暂时没有

        String createTime;
        String updateTime;
        Long createUser;
        Long updateUser;
        int dele = 0;

        System.out.println("=======添加套餐信息======");
        while (true) {
            System.out.println("请输入套餐的名称：");

            name = sc.next();

            if (name.length() < 32) {
                break;
            } else
                System.out.println("名称过长，请重新输入");
        }

        while (true) {
            System.out.println("请输入套餐的分类名称：");

            ClassInfoMapper mapper = sqlSession.getMapper(ClassInfoMapper.class);
            List<ClassInfo> classInfos = mapper.selectAll();
            if (classInfos == null) {
                System.out.println("没有分类数据，请进行添加~~");
                return;
            }
            for (int i = 0; i < classInfos.size(); i++) {
                System.out.println((i+1) + "." + classInfos.get(i).getTypesName());
            }
            typesName = sc.next();
            ClassInfo classInfo = mapper.selectAllByTypesName(typesName);
            if (classInfo != null) {
                break;
            } else {
                System.out.println("输入类型不存在，请重新输入~~~");
            }
        }

        System.out.println("请输入套餐的价格：");

        price = new BigDecimal(sc.next());
        price = price.setScale(2, BigDecimal.ROUND_HALF_UP);

        while (true) {
            System.out.println("请输入菜品的状态：0.禁售     1.开售  ");
            try {
                state = sc.nextInt();
                if (state == 1 || state == 0)
                    break;
                else
                    System.out.println("输入错误");
            } catch (Exception e) {
                System.out.println("输入错误");
                throw new RuntimeException(e);
            }
        }
        code = new Long("9" + GetIdTime.getId());

        while (true) {
            System.out.println("请输入菜品的描述信息：");

            describe = sc.next();

            if (describe.length() < 32) {
                break;
            } else
                System.out.println("名称过长，请重新输入");
        }

        createTime = GetIdTime.getDataTime();
        updateTime = GetIdTime.getDataTime();
        createUser = this.id;
        updateUser = this.id;
        Package aPackage = new Package(typesName,name,price,state,code,describe,img,createTime,updateTime,createUser,updateUser, dele);
        PackageMapper mapper = sqlSession.getMapper(PackageMapper.class);
        int i = mapper.addPackage(aPackage);
        if (i > 0) {
            sqlSession.commit();
            sqlSession.close();
            System.out.println("创建成功");
        } else
            System.out.println("创建失败");
    }


    /**
     * * -----------------------------------------------------------------------------------------------------------------------/
     */
    public void orderManagement() {

    }

    public void orderDetailsManagement() {

    }

    //添加JDBC

    /**
     * 员工表增加
     *
     */
    public void add(Employee employee) {
        SqlSession sqlSession = factory.openSession();
        EmployeeMapper mapper = sqlSession.getMapper(EmployeeMapper.class);
        int i = mapper.addEmployee(employee);
        if (i != 0) {
            sqlSession.commit();
            sqlSession.close();
            System.out.println("添加成功~~~");
            System.out.println("输入任意字符返回上一级菜单~~");
            sc.next();
        } else
            System.out.println("添加失败~~~");
    }


    /**
     * 员工信息增加
     *
     * @return
     */
    public Employee employeeInformationAdd() {

        SqlSession sqlSession = factory.openSession();

        Long id;
        String name;
        String username;
        String password;
        String phone;
        String sex;
        String idNumber;
        Integer stat = 1;
        String creatDateTime = GetIdTime.getDataTime();
        String updateDateTime = GetIdTime.getDataTime();
        Long createUser = this.id;
        Long updateUser = this.id;
        id = Long.valueOf(GetIdTime.getId() + "2");
        System.out.println("=======添加员工======");
        System.out.println("请输入姓名：");
        while (true) {
            name = sc.next();
            if (name.length() > 7)
                System.out.println("姓名过长，请重新输入：");
            else
                break;
        }
        System.out.println("请输入用户名：");

        while (true) {
            username = new Scanner(System.in).next();
            if (username.length() > 32)
                System.out.println("用户名过长，请重新输入：");
            else {
                EmployeeMapper mapper = sqlSession.getMapper(EmployeeMapper.class);
                Employee employee = mapper.selectByUsername(username);
                if (employee == null) {
                    break;
                } else
                    System.out.println("用户名重复，请重新输入：");
            }
        }

        System.out.println("请输入密码：");
        while (true) {
            password = sc.next();
            if (password.length() > 32)
                System.out.println("密码过长，请重新输入：");
            else
                break;
        }
        System.out.println("请确认密码：");
        while (true) {
            String password2 = sc.next();
            if (!password2.equals(password))
                System.out.println("两次密码不一致，请重新输入：");
            else
                break;
        }
        System.out.println("请输入手机号：");
        while (true) {
            Scanner s = new Scanner(System.in);
            try {
                phone = "" + s.nextLong();
                if (phone.length() != 11)
                    System.out.println("手机号错误，请重新输入：");
                else
                    break;
            } catch (Exception e) {
                phone = null;
                System.out.println("手机号错误，请重新输入：");
            }

        }
        System.out.println("请输入性别：");
        while (true) {
            sex = sc.next();
            if (sex.equals("女") && sex.equals("男"))
                System.out.println("性别输入错误，请重新输入：");
            else
                break;
        }
        System.out.println("请输入身份证号码：");
        while (true) {
            Scanner s = new Scanner(System.in);
            idNumber = null;
            try {
                idNumber = "" + s.nextLong();

                if (idNumber.length() != 18)
                    System.out.println("身份证号输入错误，请重新输入：");
                else
                    break;
            } catch (Exception e) {
                System.out.println("身份证号码输入错误，请重新输入：");

            }

        }

        Employee employee = new Employee(id, name, username, password, phone, sex, idNumber, stat, creatDateTime, updateDateTime, createUser, updateUser);
        return employee;
    }


    /**
     * 根据员工id修改员工信息
     *
     * @return
     */
    public void employeeInformationModify() {
        SqlSession sqlSession = factory.openSession();
        EmployeeMapper mapper = sqlSession.getMapper(EmployeeMapper.class);
        Long id;
        String column;
        String data;
        while (true) {
            System.out.println("请输入要修改的员工id~~~");
            id = Long.valueOf(sc.next());

            Employee employee = mapper.selectById(id);
            if (employee != null) {
                break;
            } else
                System.out.println("不存在该id~~,请重新输入~~~");

        }
        while (true) {
            String updateTime = GetIdTime.getDataTime();
            System.out.println("请输入修改的列名~~");
            column = sc.next();
            System.out.println("请输入修改的值~~");
            data = sc.next();


            if (column.equals("sex")) {
                if (!data.equals("女") && !data.equals("男")) {
                    System.out.println("输入的数据不正确，只允许输入男或女");
                    continue;
                }
            }
            int i = mapper.updateEmployee(column,data,updateTime,this.id,id);
            if (i < 1) {
                System.out.println("修改失败");
            } else {
                sqlSession.commit();
                sqlSession.close();
                System.out.println("修改成功");
                break;
            }
        }
    }


    /**
     * 根据id删除员工
     */
    public void employeeDeleteById() {
        SqlSession sqlSession = factory.openSession();
        Long id;
        while (true) {
            System.out.println("请输入要删除的员工id~~~");
            id = Long.valueOf(sc.next());
            EmployeeMapper mapper = sqlSession.getMapper(EmployeeMapper.class);
            Employee employee = mapper.selectById(id);

            if (employee != null) {
                break;
            } else
                System.out.println("不存在该id~~,请重新输入~~~");
            mapper = sqlSession.getMapper(EmployeeMapper.class);
            int i = mapper.delById(id);
            if (i < 1) {
                System.out.println("删除失败");
            } else {
                sqlSession.commit();
                sqlSession.close();
                System.out.println("删除成功");

            }

        }

    }


    /**
     * 展示全部员工信息
     */
    public void employeeQueryById() {

        SqlSession sqlSession = factory.openSession();
        EmployeeMapper mapper = sqlSession.getMapper(EmployeeMapper.class);
        List<Employee> employees = mapper.selectAll();
        System.out.println(employees);


    }

}
